home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / TransSkel 3.24 / Demos / Pascal Demos / MultiSkel / MSkelGlobals.p < prev    next >
Text File  |  1996-01-25  |  1KB  |  84 lines

  1. unit MSkelGlobals;
  2.  
  3. interface
  4.  
  5.     uses
  6.         Types, QuickDraw, Windows, Menus, TransSkel;
  7.  
  8.     const
  9.  
  10.         normalHilite = 0;
  11.         dimHilite = 255;
  12.  
  13.         aboutAlrtRes = 1000;
  14.         getInfoDlog = 1001;
  15.  
  16.         fileMenuRes = 1001;
  17.         editMenuRes = 1002;
  18.  
  19.         helpWindRes = 1000;
  20.         editWindRes = 1001;
  21.         zoomWindRes = 1002;
  22.         rgnWindRes = 1003;
  23.  
  24.         helpTextRes = 1000;
  25.  
  26.     var
  27.  
  28.         helpWind: WindowPtr;
  29.         editWind: WindowPtr;
  30.         zoomWind: WindowPtr;
  31.         rgnWind: WindowPtr;
  32.  
  33.         editMenu: MenuHandle;
  34.  
  35.     procedure DrawGrowBox (wind: WindowPtr);
  36.     procedure SetWindClip (wind: WindowPtr);
  37.     procedure ResetWindClip;
  38.  
  39. implementation
  40.  
  41.  
  42.     var
  43.  
  44.         oldClip: RgnHandle;
  45.  
  46.  
  47. { Draw grow box of window in lower right hand corner }
  48.  
  49.     procedure DrawGrowBox (wind: WindowPtr);
  50.         var
  51.             oldClip: RgnHandle;
  52.             r: Rect;
  53.     begin
  54.         r := wind^.portRect;
  55.         r.left := r.right - 15;            { draw only in corner }
  56.         r.top := r.bottom - 15;
  57.         oldClip := NewRgn;
  58.         GetClip(oldClip);
  59.         ClipRect(r);
  60.         DrawGrowIcon(wind);
  61.         SetClip(oldClip);
  62.         DisposeRgn(oldClip);
  63.     end;
  64.  
  65.  
  66.     procedure SetWindClip (wind: WindowPtr);
  67.         var
  68.             r: Rect;
  69.     begin
  70.         r := wind^.portRect;
  71.         r.right := r.right - 15;
  72.         oldClip := NewRgn;
  73.         GetClip(oldClip);
  74.         ClipRect(r);
  75.     end;
  76.  
  77.  
  78.     procedure ResetWindClip;
  79.     begin
  80.         SetClip(oldClip);
  81.         DisposeRgn(oldClip);
  82.     end;
  83.  
  84. end.